import React, { Component } from 'react'
import axios from 'axios'
import { RouteComponentProps } from 'react-router-dom'
import { Button } from 'antd-mobile'  //组件ts配置文件已经注入安装包内部了
//RouteComponentProps 路由配置类型 可以使用this.props.history 类的强函数
//当路由携带参数需要定义时可以用内部泛型
interface QueryType {
    id: string
}
export default class Film extends Component<RouteComponentProps<QueryType>, any> {
    state = {
        list: []
    }
    componentDidMount() {
        axios({
            url: 'http://hhh.com'
        }).then(res => {
            console.log(res)
        })
    }
    render() {
        return (
            <div>
                <Button color='danger'>antd按钮</Button>
                film
                <div>{this.props.match.params.id}</div>
            </div>
        )
    }
}
